home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / ultmtpch.lha / UPS / DPatch / DPatch.doc < prev    next >
Text File  |  1994-08-09  |  17KB  |  359 lines

  1. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  2.  
  3.  
  4.                      Yet Another Fine Production From
  5.  
  6.                             Wizard/GlenzPointS
  7.  
  8.                                  (c) 1994
  9.  
  10.                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11.                    Release Date 04/08/1994 (version 1.0)
  12.                   Second Release 05/08/1994 (version 1.1)
  13.                   Third Release 09/08/1994 (version 1.2)
  14.  
  15.  
  16. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  17.  
  18.  
  19.  
  20.  
  21.                    u·S·e·R   F·R·i·N·D·L·y   M·a·N·u·a·L
  22.                               (mixed version)
  23.  
  24.  
  25.  
  26. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  27.  
  28.  
  29.  
  30.                         ---< TaBLe oF CoNTeNTS >---
  31.  
  32.                             I......iNTRoDuCTioN
  33.                             II..............WHy
  34.                             III............WHaT
  35.                             IV..............HoW
  36.                             V........BuG RePoRT
  37.                             VI..............WHo
  38.                             VII.........HiSToRy
  39.  
  40.  
  41.                      ---< TaBLe oF iLLuSTRaTioNS >---
  42.  
  43.                             VIII...........NoNe
  44.  
  45.  
  46.  
  47. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  48.  
  49.  
  50.  
  51.                           ---< iNTRoDuCTioN >---
  52.  
  53.  
  54. \   /
  55.  \X/ell, at least, here it is...  my dream came true.  I've just written my
  56. first  patcher.   Well, it's not such hard job as some may think, but still
  57. it  wouldn't  be possible without assistance of my good friend SAA who gave
  58. me  a  final tip to start coding this piece of art.  At first I intended to
  59. write  this  manual  in  English, but then...  is there any chance for this
  60. production  to reach Inter Net or even to get out of the country?  Beat me,
  61. I  have  no idea, but I suppose not...  So, a little surprise to all of you
  62. whose mother tongue ain't English...  it's Croatian version of this manual.
  63. Any  forigners  may  contact  me  at my address and require English written
  64. manual.  I'll be happy to release it - just ask.  ;)
  65.  
  66. (...after few seconds...)
  67.  
  68. |\ |
  69. | \|aaaaaah!  Sorry,  but it seems I'm too lazy to write this manual twice.
  70. Everyone  who  is  interested  to  translating this manual to his/her local
  71. language should know that he/she has my full permission of doing that.  I'd
  72. also  like  to  recieve  translated  version  to  include it in any further
  73. release of this product.
  74.  
  75.  
  76.  
  77.                               ---< WHy? >---
  78.  
  79.  
  80. \   /
  81.  \X/hy?   Honestly  -  just  to  see  if  I'm  able  to  write it.  Well, I
  82. definitely am and I'm glad for that.  I've been thinking what to choose for
  83. my first patch and then I had brain-storming.  I asked myself what makes me
  84. most  problems  while  doing  anything with my Amiga and trying to do it as
  85. fast  as  possible?   It's  definitly  dos.library's  Delete()  function...
  86. Gee...   I  can't  even  recall  how  many  times  I've deleted something I
  87. shouldn't  and  then cried over spoilt milk...  So, decision became clear -
  88. Delete().  Let's fix it!
  89.  
  90.  
  91.                               ---< WhaT? >---
  92.  
  93.  _
  94. | \
  95. l_/eletePatch,  or  DPatch  for short, is program especially designed to be
  96. short, powerful and more than anything else - useful.  Its function is very
  97. clear.  You've probably (more than once!) deleted something you didn't want
  98. to destroy?  There are many useful tools for recovering lost data, but it's
  99. painful job and not so easy to do.  Sometime you delete something unpurpose
  100. and  overwrite  it with something else.  There's no help.  Contents is gone
  101. forever.   Many  programs don't even warn you when they're trying to delete
  102. something.   For instance - when you're working with Imagine's Quick Render
  103. option  it  won't  let you know that it's going to delete previous picture.
  104. That's  OK,  because  it's just a Quick Render, but if you've selected this
  105. option  unpurpose  the picture is gone anyway.  Not good.  Not good at all.
  106. DOPUS  is  one  of the greatest utilities I've ever used with my Amiga, but
  107. sometime  I  just  have  to do few disk operations, like deleting or moving
  108. files,  from DOS.  DOPUS would warn me if I've selected deleting some files
  109. but  DOS  wouldn't  and  again, more than once, I'm to fast to realize that
  110. I've  just  started  deleting  directory instead of file.  I hate when this
  111. happens.
  112. ___
  113.  |
  114.  |hat  would be enough of bad expiriences.  Now lets discuss cure for this.
  115. I  needed small proggy to tako control over Delete() function and to pop up
  116. requester EVERY time it's called from ANY program.  I don't care WHY, but I
  117. just wanna know that something in memory trying to delete something, either
  118. in RAM (Ram Disk) or on hard or floppy disk.  Got it?
  119.  
  120.  
  121.  
  122.                               ---< HoW? >---
  123.  
  124.  __
  125. |_
  126. l__asy.  I used Trash'm One 2 (THX SAA, again!) to create it because I just
  127. adore  this  assembler.  It's so comfortable that I feel like being able to
  128. write data base using it.  Almost.  :->
  129.  
  130. |
  131. |  choose  assembler to keep code short because it'll be resident in memory
  132. until depatch code is called.  Program uses reqtools.library to make pop up
  133. requesters  more user friendly.  I'm satisfied with results and it's really
  134. nice proggy.
  135.  
  136. |\ |
  137. | \|ote:  this patcher has been written using my A4040 (lucky me, ah?  :->)
  138. and  you'll  need  OS3.0+  for  proper  use of it (patcher, not my Amiga!).
  139. Credits  for  incompatibility  with  previous  OSes  should be sent to C='s
  140. DOS.library   developers   because   it's   unpossible  to  patch  some  of
  141. DOS.library's  functions  using  SetFunction().   I  need  no  more illegal
  142. programming.   At least no while writing something that uses system...  so,
  143. I let it go.  (Yes, I know, Snoop and similar programs also patch DOS.lib's
  144. calls,  but  in another way and I had no time to go 'around').  Get OS3.0+,
  145. get AGA, get livin'!  :->
  146.  
  147. \   /
  148.  \X/hen  DPatch  is  started  (from  CLI) it install resident piece of code
  149. (less  than  $140  bytes)  in  allocated  memory.   If  it's  impossible to
  150. allocated  memory  DPatch  won't  be  started  and  control  is immediately
  151. returned to DOS without patching anything.  No information is given to user
  152. because code would be longer and I tried to make it as compact as possible.
  153. If  patcher  is  installed it'll wait for DOS' Delete() calls and then take
  154. control  over  it.  Requester will pop up offering three different options.
  155. First  one is "I'll take my risk!".  Choosing this one, Delete() is enabled
  156. and  executed.   Second  one  is  "Beat  me!" and it's DEPATCH part of this
  157. proggy.   Clicking on this gadget will restore old Delete() and at the same
  158. time  it'll call old Delete() as you've selected first option.  Last gadget
  159. "Noooo!   I'm innocent" will disable Delete() and just skip Delete()'s call
  160. from  any  program.   First  option  (delete  enabled)  is  set as default.
  161. Pressing Return key or clicking mouse on its gadget will activate it.
  162.  
  163. \  /
  164.  \/ersion  1.1 has new option added.  Well, it's not a gadget option but if
  165. you've  been  using  DPatch  v1.0  you might remeber that you couldn't know
  166. which  file  is  being  deleted.  Now it's fixed.  Requester will show file
  167. name, so you'll allways know which file is 'in danger'.
  168.  
  169. \  /
  170.  \/ersion 1.2 is improved and it's been made more intelligent.  How?  Well,
  171. if  you're  trying to delete some file with appropriate .info and if you're
  172. doing  this  from some proggy that automatically delete .infos (like DOPUS,
  173. or  WorkBench's  Menu->Icons->Delete!) you won't get DPatch requester twice
  174. any  more.   DPatch  is  finally able to recognize few operations and it'll
  175. automatically  enable deleting .info files.  This was SAA's idea and I find
  176. it  superb!  But this is not all that v1.2 offers!  I usually use DOPUS for
  177. anything  I  do  with  files,  so  I  decided  to  make no problems between
  178. DPatch<=>DOPUS.  There was something really annoying.  DPatch would ask you
  179. twice  if  you  decided  not  to  delete  something (from DOPUS!).  This is
  180. because  DOPUS  recheck  delete  operations  and  if  they're not performed
  181. correctly  same command will be executed one more time.  I hated it!  And I
  182. fixed  it.   Some  problems  appeared  with CLI (check Bug Report!), but it
  183. works!  Enough?  No, not enough...  I forgot to mention just one more thing
  184. related  to  deleting  .info  files.   If  you  have  some <NAME> file, and
  185. <NAME.info>,  you  might  also have <NAME.info.info.info> ;).  You probably
  186. won't,  but  you  might.   So, whatz up?  DPatch will erase them all.  :) I
  187. like  it this way, I did it this way.  ;) BTW, in case you had no idea - WB
  188. is  unable  to  show 'doubled-info' files.  If you have files X, X.info and
  189. X.info.info  only two files will be used and showed (X and X.info).  If you
  190. delete X.info, WB will automatically use X.info.info under the name X.info.
  191. Weird.  Well, it won't confuse DPatch.  ;)
  192.  
  193.  
  194.  
  195.                            ---< BuG RePoRT >---
  196.  
  197.  
  198. |/
  199. |\nown  bugs?   Hmmmm...  hard to answer.  This is a patcher.  It uses some
  200. dirty tricks to work as I wanted him.  Question is - at what price?  At the
  201. time  I'm  writting  this lines patcher is active.  I'm currently in Cygnus
  202. Editor  and every few lines this text is being saved.  Just in case.  Every
  203. time  I  choose  WRITE  option  from CED's menus requester pops up.  CED is
  204. trying  to  delete  old  file  before  writing  new  one (CED is using some
  205. temporary  files  while  doing  this).  It's nice.  Requester pops up and I
  206. just press return.  My text is perfectly safe.
  207.  _
  208. |_)
  209. l_)ut!   I  tested it with other programs and find out few other things you
  210. should  be  awere.   When patcher is active, trying to delete something via
  211. Workbench's  Delete  command  (selected  in  Icon's  menu) will result with
  212. double  DPatch  requester.   This is perfectly NORMAL.  Why?  In this case,
  213. Workbench  is  trying  to  delete contents of icon you've selected and then
  214. icon  itself.   Got it?  When calling DELETE command from CLI while patcher
  215. is active and choosing disable option, DELETE command will return just name
  216. of  file  instead  of  default  syntax  "NAME deleted".  You'll also notice
  217. there's  no  end-of-line character in returned string.  This is also OK and
  218. DELETE's  author(s)  should  be  blamed  for  this - not me.  Finally, I've
  219. tested  patching  patcher...  :) I've started Snoop and patch Delete() with
  220. DPatch.   Results?  A little bit weird.  If patcher is started BEFORE Snoop
  221. everything  will  be OK, but Snoop is a clever tool.  If patcher is started
  222. after  Snoop  and  if  you're trying to close Snoop you'll get message from
  223. Snoop  that  something  (guess what?) has patched Delete().  Cure?  Depatch
  224. DPatcher and Snoop will exit automatically.  These were custom problems and
  225. if  you  have  problem  with  any other program please try to solve it in a
  226. similar way or let me know.
  227.  
  228.  | 
  229. \|ust one more thing!  This patcher should be started from CLI or something
  230. that emulates CLI.  Starting it from icon (from WB) will probably crash the
  231. system  causing alert window to appear.  Works fine with SUSPEND option (if
  232. you  don't  won't  to reboot at the moment!) but for your own safety finish
  233. all your tasks and reboot manually.
  234. ___
  235.  |
  236.  |his is a brief update for v1.2.  New 'bug' might be found in this version
  237. so  it's  better to let you all familiar with the problem.  Problem appears
  238. when you change your mind after calling DELETE command in CLI line.  If you
  239. really  change  your  mind  and  decide not to delete file that you've just
  240. jugded  to  death  second  ago,  there'll  be  troubles.   Delete  won't be
  241. executed,  don't worry, but you'll be unable to delete specified file until
  242. 'remember  buffer' keep its name.  I used some weird techniques just to fix
  243. DOPUS  troubles,  so  I  had  to compare names of some files.  When, inside
  244. DOPUS,  you're trying to delete something and then you stop it with DPatch,
  245. DOPUS  will  send  same  delete  request and DPatch will apear again (check
  246. previous  DPatch  version  if  you  don't  believe  me!).  This sucks and I
  247. decided to get rid of it.  I had to compare names and if same name has been
  248. called  twice  just pass to DPatch old values (so, if you decided to delete
  249. it  -  delete  it  all without further questions).  This caused some DELETE
  250. problems  in  CLI because you have to clear this 'remember buffer' manually
  251. and  there's  only  one  way  of doing this - erasing something else before
  252. repeating DELETE command with 'remembered' name.
  253.  
  254.  
  255.  
  256.                               ---< WHo? >---
  257.  
  258.  _
  259. |_)
  260. l_)ug  reports,  credits, money, 4 extra Megs of RAM, new 14.4K modem, HPLJ
  261. IV,  CD ROM, Ferrari, yacht, nice looking girls, blah, blah, blah...  could
  262. be sent to my address...
  263.  
  264.                                Goran Paulin
  265.                                (Wizard/GPS)
  266.                                Rade Supica 1
  267.                                51000 Rijeka
  268.                                   Croatia
  269.  
  270.                     You can also reach me by E-Mail at:
  271.  
  272.                         TVRi BBS (Rijeka, Croatia)
  273.  
  274.                            (77:500/102) CroLink
  275.                             (2:381/106) FidoNet
  276.  
  277.                           (user ID Goran Paulin)
  278.  
  279.    Never heard for this? Never mind... you can still write me a letter.
  280.  
  281. |
  282. |f  you're  sending  disks  asking  for some swapping stuff, please include
  283. either  return  stamps  (for Croatia only) or one extra disk.  You know the
  284. rulez, so...
  285.  
  286.  
  287.                              ---< HiSToRy >---
  288.  
  289.  
  290.  
  291.                                 -[ v1.0 ]-
  292.  
  293. I did it! It works! What else would you like?!? :)
  294.  
  295.                                 -[ v1.1 ]-
  296.  
  297. I  realized  there's  something  wrong.  I've been writing some scripts for
  298. DOPUS  and  at  the  same  time I've been using DPatch.  When I executed my
  299. script, DPatch warn me many, many, many times and I had no idea which files
  300. are  'in  danger'.   So,  I  decided to add name of the file that should be
  301. deleted  in  requester.   When  requester pops up, file name will be shown.
  302. Great!  Perfect!  Just as I wanted!  ;->
  303. Oh, yes!  I've just decided to write Amiga Guide version of this document.
  304.  
  305.                                 -[ v1.2 ]-
  306.  
  307. Question:  "Is it worth releasing this version?".  Answer should be:  "Yes,
  308. it is!" and you'd be damn right!  :-> Look at the progress of this patcher.
  309. In  only  5  days  it's been modified three times.  Yeah!  Great, ah?  Why?
  310. Well, I tried to discuss my problems related to this in Amiga.CL (CL stands
  311. for  CroLink, don't ask, believe!), but until now I've been talking only to
  312. two  persons.   First  is SAA who gives me new ideas and support to release
  313. new  versions.   Second  'chatter'  was  Dr.J who discovered that this baby
  314. doesn't  work  with  his machine (A500/KS1.3).  NOT MY FAULT, I repeat IT'S
  315. NOT  MY FAULT.  Designers of earlier versions of dos.library (ver$ < 39.00)
  316. missed  few things so it's unpossible to patch DOS functions in a legal way
  317. without  jumping in Supervisor mode, calculating checksum manually and then
  318. gettin'  back  to  User  state...  no, THX, I'll stick to OS3.0 with, hm...
  319. clear  dos.library (I'm sure things are still a little messy, but less than
  320. before  'cause SetFunction() works fine with it now).  What's really new is
  321. a  little  bit of intelligence added to DPatch.  ;) Sounds nice, ah?  Well,
  322. important things are described in previous sections of this manual, but for
  323. short  -  now  requester  won't  pop  up  when something's trying to delete
  324. <FILE>.info file (if <FILE> has just been deleted!) and <FILE>.info will be
  325. automatically  deleted  without  questions.   There were also some problems
  326. with  DOPUS.   Problems  usually  appeared  when user decided not to delete
  327. something  'breaking' delete call with DPatch.  At this point DOPUS (I have
  328. no  idea why) would call Delete() once again which means that you'd have to
  329. answer same question twice.  Damn stupid.  I had to fix it and I did.  BUT!
  330. New  problem  appeared.   :-<  If  you're  using DELETE command (here we go
  331. again...  ;->) and decide not to delete what you've just ordered, you'll be
  332. unable  to  delete it in next CLI line (for short - you can't have to lines
  333. "DELETE  XXX" if you forbid first delete!).  There's only one cure for this
  334. problem  -  give up OPUS support, what wouldn't be clever, so I let it this
  335. way.  If you change your mind ("I REALLY wanna delete it!"), you'll have to
  336. delete  something  else  just to empty buffer where old name was kept.  Got
  337. it?  A bit painful, but...  optimal solution.
  338.  
  339.  
  340. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  341.  
  342.  
  343.     Oh, I almost forgot -  this program is PD. If you decide to send me
  344.     few bucks or whatever, consider it ShareWare and be happy. I will.
  345.  
  346.  
  347. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  348.                          . _____   _____   _____ .
  349.                          :( ____):( ___ ):(  ___):
  350.                          :( )_( ):(   __):(___  ):
  351.                          :(_____):(___):::(_____):
  352.                          :\\X/X/:Glenz:PointS:'94:
  353.                          :/o O \:/\/\__:You:have::
  354.                          :\ (. /:\ \__/_:::No:::::
  355.                          ::\~ /(c)\____/:Excuse:::
  356.                          F·e·e·l·F·r·e·e·2·J·o·i·n
  357.  
  358. ___.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.__.+'~~`+.___
  359.